package com.dq.ad;

import android.content.Context;

import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;

/**
 * FileName: UMManager
 * Author: admin
 * Date: 2020/10/27 13:38
 * Description:
 */
public class UMManager {

    /**
     * 友盟初始化
     *
     * @param c
     * @param um_key
     * @param um_channel
     */
    public static void init(Context c, String um_key, String um_channel) {
        /** 配置友盟SDK **/
        UMConfigure.init(c, um_key, um_channel, UMConfigure.DEVICE_TYPE_PHONE, null);
        UMConfigure.setProcessEvent(true);
    }

    public static void onResume(Context c) {
        MobclickAgent.onResume(c);
    }

    public static void onPause(Context c) {
        MobclickAgent.onPause(c);
    }

    /**
     * 自定义事件
     *
     * @param a
     * @param event_id
     */
    public static void onEvent(Context c, String event_id) {
        MobclickAgent.onEvent(c, event_id);
    }
}